﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Maticsoft.Web
{
    public partial class Exit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string stuId ="";
                if (Session["login"] != null)
                {
                    stuId = Session["login"].ToString().Split('|')[0];
                    
                }
                else if (Request.Cookies["stuId"] != null)
                {
                    stuId = Request.Cookies["stuId"].Value; 

                }
                if (stuId != "")
                {
                    int id = int.Parse(stuId);
                    BLL.studentInfo bs = new BLL.studentInfo();
                    bs.Updates(id);
                }
                Session.Abandon();
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>top.location.href='default.aspx'</script>");
            }
        }
    }
}